package com.sgj.builder;

/**
 * 建造者模式
 * @Author: Guoji Shen
 * @Date: 2021/11/15 9:14
 */
public abstract class AbstractHouse {

    // 打地基
    public abstract void buildBasic();

    // 砌墙
    public abstract void buildWalls();

    // 封顶
    public abstract void roofed();

    // 开始建造
    public void build() {
        buildBasic();
        buildWalls();
        roofed();
    }
}